#ifndef								__PROCESSOR_H__
#	define							__PROCESSOR_H__

#	include							<QMutex>
#	include							<queue>
#	include							<map>
#	include							"Order.h"
#	include							"byte.h"
#	include							"IModule.h"
#	include							"BabelApi.h"
#	include							"PluginManager.h"

class								Processor
{
public:
	Processor();
	~Processor();

private:
	std::queue<IOrder*>					_order;
	QMutex								_mutex;
public:
	void								update();
	void								operator()(std::vector<byte> *, unsigned short);
	void								setAPI(BabelApi*);

private:
	void								processOrder(IOrder *order);
	IOrder								*_pop();
	void								_push(IOrder*);
	BabelApi							*_api;
	IPluginManager						*_plugin;
};

#endif								// ! __PROCESSOR_H__
